<section id="main" class="column">
	<!-- announcements -->
	<?php
	if($this->result == true){
		print "<h4 class='alert_success'>Het bericht is succesvol geplaatst</h4>";
	}
	if(isset($_GET['result']) && $_GET['result'] == "true"){
		print "<h4 class='alert_success'>Het bericht is succesvol verwijderd</h4>";
	}
	
	?>
	<article class="module width_full" style="width:64%; float:left;">
		<header>
			<h3>Mededeling toevoegen</h3>
		</header>
		<div class="module_content">
			<fieldset>
				<p>Hier onder kunt u een mededeling toevoegen. Deze zal verschijnen op de home page van het Administrator gedeelte. Via deze weg kunt u iedereen die inlogt dit bericht laten lezen</p>
			</fieldset>
			<fieldset>
			<form action="<?=$this->baseUrl()?>/administrator/announcements" method="POST">
				<input type="hidden" id"" />
				<p>
				<label for="title">Titel:</label> <br/></br>
				<input class="post_message" type="text" name="title" name="title" />
				</p>
				<p><label for="title">Inhoud:</label></p>	
				<p>
				<textarea id="content" rows="5" cols="50"  name="content"></textarea>
				</p>
				<p><input type="submit" id="submitAnnouncement" name="submitAnnouncement" value="Opslaan"></p>
			</form>
		</fieldset>
		</div>
	</article>
	<article class="module width_quarter" style="float:left; margin-left:0px; ">
		<header>
			<h3>Aanwezige Mededeling</h3>
		</header>
		<div class="module_content">

			<?php
				foreach ($this->announcements as $announcement) {
					print "<fieldset class='fieldannounce' style='width:98%; margin:0px;'>";
					print "<a style='float:right;' href='".$this->baseUrl()."/administrator/announcements?remove=".$announcement->id."' /><img class='removeBtn' src='../template/images/back/close.png' alt='deletebutton' /></a><h3>".$announcement->title."</h3>";
					print "</fieldset>";
				}
			?>
		</div>
	</article>
</section>
